home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / ixemlsrc.lha / ixemul / glue / Makefile.in < prev   
Makefile  |  1995-12-23  |  2KB  |  96 lines

  1. # Glue comes in two flavors, one for flat address spaces and one for base
  2. # relative.  When gen_glue is compiled, which form of glue is generated
  3. # when it is run depends upon whether "__no_baserel" or "__baserel" was defined
  4. # when it was compiled.
  5.  
  6. #### Start of system configuration section. ####
  7.  
  8. srcdir =    @srcdir@
  9.  
  10. ifeq ($(srcdir),.)
  11. srcdir = ..
  12. endif
  13.  
  14. VPATH :=    $(srcdir)
  15.  
  16. # Common prefix for machine-independent installed files.
  17. prefix =    @prefix@
  18.  
  19. # Common prefix for machine-dependent installed files.
  20. exec_prefix =    @exec_prefix@
  21.  
  22. bindir =    $(exec_prefix)/bin
  23. libdir =    $(exec_prefix)/Sys/libs
  24.  
  25. INSTALL =    @INSTALL@
  26. INSTALL_DATA =    @INSTALL_DATA@
  27.  
  28. CC =        @CC@
  29.  
  30. CFLAGS =    @CFLAGS@
  31. LDFLAGS =    @LDFLAGS@
  32.  
  33. RANLIB =    @RANLIB@
  34. AR =        ar
  35. RM =        rm -f
  36.  
  37. #### End system configuration section ####
  38.  
  39. # BASE is defined to be either "no-baserel" or "baserel" by an upper level
  40. # makefile.  The default is "no-baserel".
  41.  
  42. BASE =        no-baserel
  43.  
  44. FLAVOR_CFLAGS =
  45. OTHER_CFLAGS =    -fomit-frame-pointer
  46. ALL_CFLAGS =    $(CFLAGS) $(FLAVOR_CFLAGS) $(OTHER_CFLAGS) $(INCS)
  47.  
  48. INCS =        -I$(srcdir) -I$(srcdir)/../library -I$(srcdir)/../include
  49. LIB =        libglue.a
  50. LIB_P =        libglue_p.a
  51. SHELL =        /bin/sh
  52.  
  53. .c.o:
  54.         $(CC) $(ALL_CFLAGS) -c $< -o $@
  55.  
  56. .s.o:
  57.         cp $< x.c
  58.         $(CC) $(CFLAGS) $(OTHER_CFLAGS) -traditional -E x.c -o x.s
  59.         $(CC) $(CFLAGS) $(OTHER_CFLAGS) $(INCS) -c x.s -o $@
  60.         $(RM) x.c x.s
  61.  
  62.  
  63. ifeq ($(BASE),baserel)
  64. all:        gen_glue $(LIB)
  65. else
  66. all:        gen_glue $(LIB) $(LIB_P)
  67. endif
  68.  
  69. gen_glue:    gen_glue.o
  70.         $(CC) gen_glue.o -o gen_glue
  71.  
  72. gen_glue.o:    gen_glue.c $(srcdir)/../include/sys/syscall.def
  73.         $(CC) $(ALL_CFLAGS) -c $< -o $@
  74.  
  75. $(LIB):        $(srcdir)/../include/sys/syscall.def
  76.         rm -f *.[os]
  77.         ./gen_glue $(BASE)
  78.         cp /gnu/bin/as /ram/as
  79.         for asm in *.s; do echo $$asm ; /ram/as -m68000 $$asm -o $$asm.o; done
  80.         $(AR) rv $@ *.o
  81.         rm -f *.[os] /ram/as
  82.  
  83. $(LIB_P):    $(srcdir)/../include/sys/syscall.def
  84.         rm -f *.[os]
  85.         ./gen_glue profiling
  86.         cp /gnu/bin/as /ram/as
  87.         for asm in *.s; do echo $$asm ; /ram/as -m68000 $$asm -o $$asm.o; done
  88.         $(AR) rv $@ *.o
  89.         rm -f *.[os] /ram/as
  90.  
  91. clean:
  92.         rm -rf *baserel
  93.  
  94. clobber:    clean
  95.         rm -f Makefile
  96.